/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ps.server.classes;

/**
 *
 * @author Ricardo
 */
public class product_features {

    private String id;
    private String[][] name;
    private int column = 2;

    public int getColumn() {
        return column;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String[][] getName() {
        return name;
    }

    public void setName(String[][] name) {
        this.name = name;
    }

    public String toXML() {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
        xml += "<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";
        xml += "<product_feature>\n";
        xml += "<id></id>\n";
        xml += "<name>\n";
        for (int x = 0; this.name.length > x; x++) {
            xml += "<language id=\"" + this.name[x][0] + " \">" + this.name[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</name>\n";
        xml += "</product_feature>\n";
        xml += "</prestashop>";
        return xml;
    }
        public String[] GetMetaData() {
        return new String[]{"id", "name"};
    }
}
